//
//  HX_FlagCarCell.m
//  UI19 - Car(汽车之家)
//
//  Created by 韩旭 on 16/8/9.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "HX_FlagCarCell.h"
#import "FlagshipModel.h"
#import "UIImageView+WebCache.h"
@implementation HX_FlagCarCell
- (void)setFlagModel:(FlagshipModel *)flagModel {
    _flagModel = flagModel;
    self.lableName.text = flagModel.seriesname;
    _lableName.textAlignment = 1;
    [self.imageHead sd_setImageWithURL:[NSURL URLWithString:flagModel.img]];
}
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        _imageHead = [[UIImageView alloc] initWithFrame:CGRectZero];
        _imageHead.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:_imageHead];
        _lableName = [[UILabel alloc] initWithFrame:CGRectZero];
        _lableName.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:_lableName];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _imageHead.frame = CGRectMake(0, 0, self.frame.size.width, self.contentView.frame.size.height * 0.8);
    _lableName.frame = CGRectMake(0, _imageHead.frame.size.height, _imageHead.frame.size.width, self.contentView.frame.size.height * 0.2);
}
@end
